package com.aidex.ajreport.mapper;

import com.aidex.ajreport.domain.GaeaReportDashboard;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Select;


public interface GaeaReportDashboardMapper extends BaseMapper<GaeaReportDashboard> {

    @Result(column = "rcode", property = "widgets", many = @Many(select = "com.aidex.ajreport.mapper.GaeaReportDashboardWidgetMapper.selectByRcode"))
    @Result(column = "rcode", property = "rcode")
    @Select("select * from gaea_report_dashboard t where t.rcode = #{rcode}")
    GaeaReportDashboard queryByRcode(@Param("rcode") String rcode);
}
